using System;
using System.Collections.Generic;
using System.Text;
using NHibernate.Collection;
using Iesi.Collections;

namespace Chat.metier
{
    [Serializable]
    public class User
    {
        private int _id;

        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }
        private String _login;

        public String Login
        {
            get { return _login; }
            set { _login = value; }
        }
        private String _passwd;

        public String Passwd
        {
            get { return _passwd; }
            set { _passwd = value; }
        }
        private String _name;

        public String Name
        {
            get { return _name; }
            set { _name = value; }
        }
        private String _email;

        public String Email
        {
            get { return _email; }
            set { _email = value; }
        }

        private ISet _contacts = new HashedSet();

        public ISet Contacts
        {
            get { return _contacts; }
            set { _contacts = value; }
        }

        public virtual void AddContact(User u)
        {
            _contacts.Add(u);
        }
    }
}
